package cn.wolfcode.shop.member.feign;

import cn.wolfcode.shop.common.util.Result;
import cn.wolfcode.shop.member.domain.User;
import cn.wolfcode.shop.member.hystrix.UserFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = "member-server",fallback = UserFeignHystrix.class)
public interface UserFeignApi {

    @GetMapping("/users/{id}")
    Result<User> get(@PathVariable("id") Long id);

    @GetMapping("/token/{token}")
    Result<Boolean> refreshToken(@PathVariable("token")String token);

}
